package com.yanze.schoolinformation.utils;

import android.app.ProgressDialog;
import android.content.Context;

/**
 * Created by MrZheng on 2017/10/19.
 */

public class DialogUtils {

    private static ProgressDialog mDialog;

    public static void showDialog(Context context, String msg) {
        if (mDialog == null) {
            mDialog = new ProgressDialog(context);
            mDialog.setCancelable(false);
        }
        mDialog.setMessage(msg);
        mDialog.show();
    }

    public static void dismissDialog() {
        if (mDialog != null) {
            mDialog.dismiss();
            mDialog = null;
        }
    }


}
